﻿@{
    ViewBag.Title = "Mérési képek";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@using ELTE.SEM.Data.ViewModels

@model List<SEMLogEntryPictureViewModel>

<div class="scan-image-list-container">
    <script type="text/javascript" src="/Scripts/Page/SemLog/LogEntryPictures.js"></script>
    @if (this.Model != null && this.Model.Count > 0)
    {
        try
        {

            foreach (var item in Model)
            {
                if (item.PictureStream.Length > 0)
                {
                    <div class="scan-image">
                        <div>
                            <img src=@String.Concat("data:image/png;base64,", @System.Convert.ToBase64String(item.PictureStream.ToByteArray())) />
                        </div>

                    </div>       
                }
                else
                {
@*<div>No image</div> *@
                }
            }
        
        <div class="invisible" id="log-entry-pics-fullsize">
            <div id="fullsize-pic-container">
                <div id="fullsize-pic">
                    <img id="pic-full" />
                </div>
                
            </div>
            
        </div>
        }
        catch (Exception ex)
        {
        }
    }
</div>